namespace JMClient.Assets.ClientDesignConfig;

/// <summary>
/// Host 配置根类，对应 appsettings.json
/// </summary>
public class HostConfig
{
    public LoggingConfig Logging { get; set; } = new();
    public ApplicationConfig Application { get; set; } = new();
    public DatabaseConfig Database { get; set; } = new();
    public WindowConfig Window { get; set; } = new();
}

/// <summary>
/// 日志配置
/// </summary>
public class LoggingConfig
{
    public LogLevelConfig LogLevel { get; set; } = new();
}

public class LogLevelConfig
{
    public string Default { get; set; } = "Information";
    public string Microsoft { get; set; } = "Warning";
    public string Microsoft_Hosting_Lifetime { get; set; } = "Information";
}

/// <summary>
/// 应用程序配置
/// </summary>
public class ApplicationConfig
{
    public string Name { get; set; } = "JMClient";
    public string Version { get; set; } = "1.0.0";
    public string Environment { get; set; } = "Development";
    public string BaseDirectory { get; set; } = "bin";
    public string ConfigDirectory { get; set; } = "config";
    public string DataDirectory { get; set; } = "data";
}

/// <summary>
/// 数据库配置
/// </summary>
public class DatabaseConfig
{
    public string ConnectionString { get; set; } = "Data Source=JMData.db";
    public bool AutoCreate { get; set; } = true;
}

/// <summary>
/// 窗口配置
/// </summary>
public class WindowConfig
{
    public int DefaultWidth { get; set; } = 1200;
    public int DefaultHeight { get; set; } = 800;
    public int MinWidth { get; set; } = 800;
    public int MinHeight { get; set; } = 600;
    public string Title { get; set; } = "JM Client Application";
    public string StartupLocation { get; set; } = "CenterScreen";
} 